define([
    "jquery",
    "IO",
    "bootbox"
], function ($, IO, bootbox) {

    $(function () {

        var activity_mid = localStorage.getItem("activity_mid");

        //查询
        $("#btnSave1").bind("click", function () {
            var parmas={};
            parmas.activity_mid=activity_mid;
            parmas.year_id=1;

            IO.post('/shapan/api/cashReturnAdd',parmas,function(c){

                if(c.code==0){
                    alert('生成成功');
                }else {
                    alert('生成失败');
                }
            });
        });
        $("#btnSave2").bind("click", function () {
            var parmas2={};
            parmas2.activity_mid=activity_mid;
            parmas2.year_id=2;

            IO.post('/shapan/api/cashReturnAdd',parmas2,function(c){

                if(c.code==0){
                    alert('生成成功');
                }else {
                    alert('生成失败');
                }
            });
        });
        $("#btnSave3").bind("click", function () {
            var parmas3={};
            parmas3.activity_mid=activity_mid;
            parmas3.year_id=3;
            IO.post('/shapan/api/cashReturnAdd',parmas3,function(c){
                if(c.code==0){
                    alert('生成成功');
                }else {
                    alert('生成失败');
                }
            });
        });
    })
});